﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IGolovkine.ShoutCastRipper.Filters
{
    public class ContentTitleFilterResult
    {
        private string _reason;
        private bool _accepted;

        private ContentTitleFilterResult(string reason, bool accepted)
        {
            _reason = reason;
            _accepted = accepted;
        }

        public string RejectionReason
        {
            get { return _reason; }
        }
        public bool Rejected
        {
            get { return !_accepted; }
        }

        public bool Accepted
        {
            get { return _accepted; }
        }

        private static readonly ContentTitleFilterResult AcceptedInstance = new ContentTitleFilterResult(null, true);

        public static ContentTitleFilterResult AcceptedResult()
        {
            return AcceptedInstance;
        }

        public static ContentTitleFilterResult RejectedResult(string format, params object [] args)
        {
            return new ContentTitleFilterResult(string.Format(format, args), false);
        }
    }
}
